package com.example.another.method;

public class TestEmail {
    public static void main(String[] args) {
        test();
    }
    public static void test(){
        EmailEntity email = new EmailEntity();
        email.setUserName("914000408@qq.com");
        email.setPassword("pjwzdgkptzpibech");
        email.setHost("smtp.qq.com");
        email.setPort(25);
        email.setFromAddress("914000408@qq.com");
        email.setToAddress("914000408@qq.com");
        email.setSubject("这是一封测试邮件!!!!");
        email.setContext("看看这是什么");
        email.setContextType("text/html;charset=utf-8");
        boolean flag = EmailSend.EmailSendTest(email);
        System.err.println("邮件发送结果=="+flag);
    }
}